package svc

import (
	"smsbridge/api/internal/config"
	"smsbridge/smsrpc/smsrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	SmsRpc smsrpcclient.Smsrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		SmsRpc: smsrpcclient.NewSmsrpc(zrpc.MustNewClient(c.SmsRpc)),
	}
}
